import 'package:flutter_app/2_advance/net/app_api.dart';
import 'package:flutter_app/2_advance/net/app_http.dart';

class AppRequest {

  static Future<List<String>> getRecommendImages() async {
    var data = await AppHttp.request<List?>(method: AppHttpMethod.GET, path: AppApi.recommendImages);
    if (data != null) {
      return data.map<String>((e) => e.toString()).toList();
    }
    return [];
  }

  static Future<String?> getRecommendVideos() async {
    return  AppHttp.request<String?>(method: AppHttpMethod.GET, path: AppApi.recommendVideos);
  }

}
